import request from '@/utils/request'

const baseUrl = '/spoken/courseTag'

// 查询课程分类列表
export function listCourseTag(query) {
  return request({
    url: baseUrl +'/list',
    method: 'get',
    params: query
  })
}

// 查询课程分类详细
export function getCourseTag(cTagId) {
  return request({
    url: baseUrl + '/' + cTagId,
    method: 'get'
  })
}

// 新增课程分类
export function addCourseTag(data) {
  return request({
    url: baseUrl,
    method: 'post',
    data: data
  })
}

// 修改课程分类
export function updateCourseTag(data) {
  return request({
    url: baseUrl,
    method: 'put',
    data: data
  })
}

// 删除课程分类
export function deleteCourseTag(cTagId) {
  return request({
    url: baseUrl + '/' + cTagId,
    method: 'delete',
  })
}
